package com.wjerp.tplus.server.api.request;

import com.wjerp.tplus.server.common.exception.BusinessException;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author lishuailei
 */
@ApiModel("修改密码入参")
@Data
public class ModifyPasswordRequest {
    @ApiModelProperty("密码1")
    private String password;

    @ApiModelProperty("密码2")
    private String confirmPassword;

    public void checkParams() throws BusinessException {
        if(!password.equals(confirmPassword)){
            throw new BusinessException("两次输入密码不一致");
        }
    }
}
